package com.demo.common.ratelimit.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.List;

/**
 * @Author：DayDayUp
 * @Create：2023/4/7 15:51
 */
@Data
@ConfigurationProperties(prefix = RateLimiterProperties.PREFIX)
public class RateLimiterProperties {
    public static final String PREFIX = "rate-limiter";

    /**
     * 是否开启限流
     */
    private boolean enabled = true;

    /**
     * 站点访问时间
     */
    private Integer userWebTime = 1;

    /**
     * 站点访问次数
     */
    private Integer userWebCount = 20;

    /**
     * api访问时间
     */
    private Integer userApiTime = 1;

    /**
     * api访问菜蔬
     */
    private Integer userApiCount = 3;

    /**
     * 需要排除的url
     */
    private List<String> excludeUrlList;
}
